﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_cm_GetContentByContentCode')
BEGIN
    PRINT 'Dropping Procedure proc_cm_GetContentByContentCode'
    DROP  Procedure  proc_cm_GetContentByContentCode
END
GO

PRINT 'Creating Procedure proc_cm_GetContentByContentCode'
GO

CREATE Procedure dbo.proc_cm_GetContentByContentCode
	@pContentCd varchar(50)
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

	select
		[content_id]
		,[content_cd]
		,[content_txt]
		,[create_dttm]
		,[update_dttm]
		,[content_html_txt]
		,[html_page_id]
		,[display_sectionheader_ind]
		,[sectionheader_txt]
		,[divider_color_txt]
		,[priority_num]
	from
		[dbo].[tbl_v2_Content]
	where
		[content_cd] = @pContentCd
END
GO

GRANT EXEC ON dbo.proc_cm_GetContentByContentCode TO PUBLIC
GO

